1. Field of the Invention
The present invention relates to an image signal analyzing system for analyzing a pattern of an image on the basis of the waveforms of the image signals. Further, the invention relates to an image signal coding system for coding an image signal by using the image signal analyzing system.
2. Discussion of the Related Art
One of the known image data signal coding systems is an image signal coding system based on the discrete cosine transform, as a kind of the orthogonal transform, which is employed in the JPEG system as the standard system for facsimile communication. For the JPEG system, reference is made to ISO-IEC/CD 10918-1, "Digital Compression and Coding of Continuous-Tone Still Images Part 1 Requirement and Guideline".
The two-dimensional discrete cosine transform of degree is given by the following equation (1), and the reverse transform is given by the equation (2). ##EQU1##
Here, ##EQU2## where f(i,j) represents each element of a pixel block and i and j indicate a position of the element. F(u,v) represents each element of the transform coefficients, and u and v indicate a position of the element.
In the image signals of so-called natural images, such as portrait and scenery, as known, adjacent pixels tend to have proximate pixel values, that is, a high correlation is present between the adjacent pixels. The signal of high correlation indicates that signal power distribution is deviated to specific frequency components on the frequency axis. By coding only the frequency components on which the signal power is concentrated, the amount of information can be reduced as a whole. When the natural image is discrete cosine transformed, most of the signal power concentrates on the low frequency region in the signal power distribution.
The arrangement of a conventional image signal coding system will be described with reference to FIG. 10.
In the figure, reference numeral 1 designates an input image signal; 3, an input pixel block signal extracted from the input image signal by a block extracting section 2; 101, a transform coefficient signal produced from an orthogonal transforming section 100 where the discrete cosine transformation expressed by the equation (1) is applied to the input pixel block signal 3; 103, a quantizing matrix signal derived from a quantizing matrix storing section 104 where quantizing matrix values are stored; 105, a quantizing coefficient signal produced from a quantizing section 102 where the transform coefficient signal 101 is quantized in accordance with the quantizing matrix 103; 107, a variable length coded signal produced from a variable length coding section 106 where the quantizing coefficient signal 105 is variable length coded; and 109, coded data signal provided from a multiplying section 108 where the variable length coded signal 107 is multiplied. As described above, reference numeral 2 designates the block extracting section for extracting the input pixel block signal 3 representative of pixel blocks as square areas of pixels; 100, the orthogonal transforming section for discrete cosine transforming the input pixel block signal 3; 104, the quantizing matrix storing section for storing quantizing matrix values; 102, the quantizing section for quantizing the transform coefficient signal 101 in accordance with the quantizing matrix signal 103; 106, the variable length coding section for variable length coding the quantized coefficient signal 105; and 108, the multiplexing section for multiplexing the variable length coded signal 107 into the coded data signal 109.
The operation of the conventional image signal coding system will be described with reference to FIG. 10.
The block extracting section 2 extracts the input pixel block signal 3 representative of pixel blocks as square areas of pixels, from the input image signal 1, as shown in FIG. 11. In the figure, each pixel area consists of 8.times.8 pixels. In the description to follow, this pixel area size will be used in the related sections.
Subsequently, the orthogonal transforming section 100 applies the discrete cosine transforming process expressed by the equation (1) to the input pixel block signal 3. As the result of the transforming process, the orthogonal transforming section 100 produces the transform coefficient signal 101 of the 8.times.8 matrix. The transform coefficient signal 101, when output, takes the form of a one-dimensional coefficient series formed by scanning the matrix in a zig-zag fashion as shown in FIG. 12.
In the quantizing section 102, the quantizing process is carried out using the transform coefficient signal 101 and the quantizing matrix signal 103 that is stored in the quantizing matrix storing section 104. This process is a rounding process defined by the following equations EQU C(u,v)=(F(u,v)+(Q(u,v)/2))/Q(u,v) (F(u,v).gtoreq.0) (4) EQU C(u,v)=(F(u,v)-(Q(u,v)/2))/Q(u,v) (F(u,v)&lt;0) (5)
where F(u,v) and Q(u,v) are respectively the elements of the transform coefficients and the quantizing matrix. u and v are representative of a position of each element. An example of the quantizing matrix 103 is shown in FIG. 13. A value of each position is called a quantizing step value.
The element values represented by the quantizing matrix signal 103 are stored in the quantizing matrix storing section 104 in the order along the path of a zig-zag scan shown in FIG. 12. With this, the quantizing section 102 reads the quantizing step values corresponding to the positions of the transform coefficients 101, and the quantizing processes of the equations (4) and (5) are carried out successively in the zig-zag scan order.
In the conventional technique, the image quality and the coding efficiency are determined by the quantizing process. The information reduction in the coding operation is realized by a reduction of the bit accuracy of the transform coefficients. Usually, the power distribution of the transform coefficients is deviated. Therefore, the improvement of both the image quality and the coding efficiency is made in a manner that the bit accuracy of the coefficients having large signal power in the signal power distribution is high, while the bit accuracy of the coefficients having small signal power is low or coarse. In the matrix of FIG. 13, a large number of bits are assigned to the coefficients of low frequency components, while a small number of bits are assigned to the coefficients of high frequency components.
The JPEG system as referred to above does not have a means for analyzing the waveforms of the input image signals. Further, in the JPEG system, only one type of quantizing characteristic is applied for one image (one color component in the case of a color image). For this reason, this coding system is adaptable for only the limited contents of an original document and can insufficiently improve both the reproduced image quality and the coding efficiency.
To solve these problems, a method for determining the best assignment of bits in accordance with the characteristic of each image on the basis of a variance of the transform coefficients is described in "IMAGE PROCESSING HANDBOOK (9.3 Coding of Monochromatic Still Picture)", written by Morio Ogami, published by Shokodo Inc., 1987, p221. This method succeeds in improving both the image quality and the compression efficiency. The assignment of bits in this adaptive bit assigning method is mathematically expressed by ##EQU3## where b(u,v) represents the number of bits assigned to the transform coefficient F(u,v), and .sigma.(u,v).sup.2 is representative of a variance of the transform coefficient F(u,v), and .theta. represents the average number of bits.
Using the number of assigned bits b (u,v) and a dynamic range L (u,v) of the transform coefficients, we have a quantizing step value Q (u,v) EQU Q(u,v)=Int [L(u,v)/2.sup.b (u,v)] (8)
where Int [] means "to make the number integer".
The variable length coding section 106 shown in FIG. 10 encodes the quantizing coefficient signal 105 into the assigned variable length coded signal 107 by the variable length coding method, e.g., the Huffman coding method.
The multiplexing section 108 multiplexes the variable length coded signal 107 into the coded data signal 109. At this point, the coding operation is completed.
Usually, an image read by a scanner, for example, possibly contains different image areas, such as character areas and photograph areas. When the transform coding system is applied to the image containing the different image areas, the power distribution of the transform coefficients greatly differs with the image areas.
As described above, the technique for determining the best assignment of bits in accordance with the image characteristic has been already described in the handbook of "IMAGE PROCESSING HANDBOOK". In this conventional technique, the best bit assignment is determined on the basis of the average characteristic of the whole image to be coded. In other words, the different characteristics of the image areas are not taken into consideration in the coding operation. Accordingly, the technique must apply the average bit assignment obtained for the whole image to the character area contained in the photographic image. The character area requires many bits because of its high frequency components generated at the edges. The distribution of the high frequency components varies with the direction of the edge. Therefore, the coding technique based on the average bit assignment cannot well handle these characteristic differences. This means that the deterioration of the character image quality is inevitable.
FIGS. 14(a) to 16(b) show some types of correspondence of a pixel distribution and a coefficient power distribution on some types of pixel blocks. In the pixel blocks of FIGS. 14(a) and 14(b), tone is varied in the horizontal direction. In the pixel blocks of FIGS. 15(a) and 15(b), tone is varied in the vertical direction. In the pixel blocks of FIGS. 16(a) and 16(b), tone is varied in the oblique direction. The pixel distributions are shown in FIGS. 14(a), 15(a) and 16(a), and the power distributions of transform coefficients are shown in FIGS. 14(b), 15(b) and 16(b). As seen from those figures, the coefficient power distribution varies depending on the direction of the tone variation of the input pixel blocks, and the amplitudes thereof. From those distributions of pixels and transform coefficients, it could be considered that the improvement of both the image quality and the coding efficiency would be ensured by an adaptive coding system for determining the quantizing characteristic of the transform coefficients on the basis of the results of analyzing the waveforms of the input pixel blocks.